/*
 * @(#)AuthenticationHandler.java
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */
package com.dcivision.user.auth;

import java.sql.Connection;

import javax.servlet.http.HttpServletRequest;

import com.dcivision.framework.ApplicationException;
import com.dcivision.framework.SessionContainer;
import com.dcivision.framework.web.LoginForm;
import com.dcivision.user.bean.UserGroup;
import com.dcivision.user.bean.UserRecord;
import com.dcivision.user.bean.UserRole;

/**
  AuthenticationHandler.java

  This class is providing an interface for all kind of authenication implementations.

    @author           Rollo Chan
    @company          DCIVision Limited
    @creation date    15/07/2003
    @version          $Revision: 1.7.32.1 $
*/ 

public interface AuthenticationHandler {

  public abstract UserRecord Login(LoginForm loginForm, SessionContainer sessionContainer, HttpServletRequest request, Connection conn) throws ApplicationException;

  public abstract void Logout(SessionContainer sessionContainer, HttpServletRequest request) throws ApplicationException;

  public abstract void retrieveUserGroupList(SessionContainer sessionContainer) throws ApplicationException;

  public abstract void retrieveUserRoleList(SessionContainer sessionContainer) throws ApplicationException;

  public abstract void insertUserRecord(UserRecord userRecord, SessionContainer sessionContainer) throws ApplicationException;

  public abstract void updateUserRecord(UserRecord userRecord, SessionContainer sessionContainer) throws ApplicationException;

  public abstract void deleteUserRecord(UserRecord userRecord, SessionContainer sessionContainer) throws ApplicationException;

  public abstract void insertUserGroup(UserGroup userGroup, SessionContainer sessionContainer) throws ApplicationException;

  public abstract void updateUserGroup(UserGroup userGroup, SessionContainer sessionContainer) throws ApplicationException;

  public abstract void deleteUserGroup(UserGroup userGroup, SessionContainer sessionContainer) throws ApplicationException;

  public abstract void insertUserRole(UserRole userRole, SessionContainer sessionContainer) throws ApplicationException;

  public abstract void updateUserRole(UserRole userRole, SessionContainer sessionContainer) throws ApplicationException;

  public abstract void deleteUserRole(UserRole userRole, SessionContainer sessionContainer) throws ApplicationException;
                                                                                                                        
  public abstract void initializeLoginUser(String loginName, HttpServletRequest request, Connection conn) throws ApplicationException;                                                                                                                        
  

}